]> permondes.de Git - Analog_Engine.git/blame_incremental - scripts/EP1 10.02 Forced Harmonic Oscillator.LACE
Further examples of harmonic oscillation
[Analog_Engine.git] / scripts / EP1 10.02 Forced Harmonic Oscillator.LACE
... / ...
CommitLineData
1# Forced Damped_Harmonic Oscillator
2# x'' + 2*delta*x' + omega.0^2*x = A cos (omega.f t)
3
4# generating oscillation with omega.f
5# f'' = -omega.f^2*f
6coefficient.1(-1) -> -f0 # amplitude
7coefficient.2 -> omega^2
8iintegrate f'' -> -f'
9iintegrate -f' -> f
10 IC: -f0
11cmultiply f, omega^2 -> omega^2*f
12invert omega^2*f -> -omega^2*f
13assign -omega^2*f -> f''
14invert f -> -f
15output f -> y
16
17# forced damped harmonic oscillation
18# x'' = -(2*delta*x' + omega.0^2*x) + A cos (omega.f t)
19coefficient.5(-1) -> -x0 # amplitude of oscillation
20coefficient.6 -> 2*delta # attenuation
21coefficient.7 -> omega.0^2 # Eigenfrequency of this oscillator, ^2
22
23iintegrate x'' -> -x'
24invert -x' -> x'
25cmultiply x', 2*delta -> 2*delta*x'
26
27iintegrate -x' -> x
28 IC: -x0
29cmultiply x, omega.0^2 -> omega.0^2*x
30isum 2*delta*x', omega.0^2*x, -f -> -(2*delta*x'+omega.0^2*x)-f
31assign -(2*delta*x'+omega.0^2*x)-f -> x''
32
33output(x) -> x